﻿using Ext.Net.MVC;
using Sharp.Portal;
using Sharp.Portal.ExtNet;
using Sharp.Portal.Mvc.List;
using Sharp.Portal.Other;
using Alignment = Ext.Net.Alignment;
using Column = Ext.Net.MVC.ColumnAttribute;
using TreeColumn = Ext.Net.MVC.TreeColumnAttribute;
namespace Sharp.WebBooter.Areas.Platform.Models
{
    [ModuleCode("AvailablePermissionManage"), Title("可用权限管理")]

    [DataHandler(ModuleOP.Refresh, "刷新", 4)]
    [DataHandler("SaveToPermission", "保存", 5, OnClientClick = "new AvailablePermission().saveToPermission();", Icon = "Icon.DatabaseSave")]
    public class AvailablePermissionIndexViewModel : ExtSharpTreeList
    {

        public AvailablePermissionIndexViewModel()
        {
            this.Feature = ListFeature.MultiSelect;
        }
        /// <summary>
        /// Id
        /// </summary>
        public System.Guid Id { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Column(Width = 80, Text = "排序", Order = 3, DataIndex = "orderIndex")]
        public int OrderIndex
        {
            get;
            set;
        }
        /// <summary>
        /// 编码
        /// </summary>
        [Column(Width = 80, Text = "编码", Order = 2, DataIndex = "code", Flex = 1)]
        public string Code { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        /// <value>标题</value>
        [TreeColumn(Text = "名称", Order = 1, DataIndex = "text", Flex = 2), QueryOption(Option = QueryFeature.DefualtQuery)]
        public string Title { get; set; }



        [Column(Text = "分类", Order = 3, Align = Alignment.Center, DataIndex = "category")]
        public string Category { get; set; }
        [Column(Text = "系统代码", Order = 4, Align = Alignment.Center, DataIndex = "systemCode")]
        public string SystemCode { get; set; }
    }
}